const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const ObjectId = Schema.Types.ObjectId;

const ShopGoodsSchema = new Schema({
    shops: {//商店
        type: ObjectId,
        ref: "shops"
    },
    goods: {//物品
        type: ObjectId,
        ref: "goods"
    },
    equipment: {//装备
        type: ObjectId,
        ref: "equipments"
    },
    count: {  //库存数量
        type: Number,
        default: 100
    },
});

module.exports = Shop_good = mongoose.model("shopgoods", ShopGoodsSchema);